import {
  Table,
  Model,
  Column,
  DataType,
  // HasMany,
  // ForeignKey,
  // BelongsTo,
  PrimaryKey,
  AutoIncrement,
  Unique,
  AllowNull,
  Comment,
} from 'sequelize-typescript';
// import { Repair } from './repair.entity';

@Table({
  tableName: 'repairItem',
  comment: '维修项目表',
})
export class RepairItem extends Model {
  @PrimaryKey
  @AutoIncrement
  @Unique
  @AllowNull(false)
  @Comment('报修项id')
  @Column(DataType.BIGINT)
  id: number;

  @AllowNull(false)
  @Comment('报修项名称')
  @Column(DataType.STRING(100))
  name: string;

  // @HasMany(() => Repair)
  // repairs: Repair[];
}
